class CreateDocuments < ActiveRecord::Migration
  def self.up
    create_table :documents do |t|
      t.integer :category_id, :default => 1
      t.string  :title
      t.string  :summary
      t.integer :creator
      t.text    :content
      t.integer :click_count, :default => 0
      t.integer :reply_count, :default => 0
      t.integer :history_count, :default => 0
      t.integer :attendee_count, :default => 1
      t.integer :vote_count
      t.string  :first_img
      t.boolean :lock, :default => false
      t.boolean :pass, :default => true       
      t.timestamps
    end
  end

  def self.down
    drop_table :documents
  end
end
